package cn.news.control;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.news.biz.TopicBiz;

public class AdminTopicDeleteServlet extends HttpServlet {
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String id=request.getParameter("bid");
		 int tid=Integer.parseInt(id);
		 TopicBiz tBiz=new TopicBiz();
		 if(tBiz.delete(tid)){
			 response.sendRedirect("topicSucc.jsp");
		 }
	}
	
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doGet(req, resp);
	}
}
